﻿using System.Web.Mvc;
using GdNet.Core.Assistants;
using GdNet.WebFramework.Business.System;

namespace GdNet.WebFramework.Business.Impl.System
{
    public class ReflectionModelBidingService : IModelBidingService
    {
        public void UpdateModel(object model, FormCollection formCollection)
        {
            foreach (string key in formCollection.Keys)
            {
                ReflectionAssistant.SetPropertyValue(model, key, formCollection[key]);
            }
        }
    }
}
